<template>
	<view class="subaccountlist">
		<!-- 顶部导航 -->
		<diyNavBar value='子账户' :bottom='40'></diyNavBar>
		<view class="item" v-for="(item,index) in dataList" :key="index">
			<text class="header iconfont icon-wode"></text>
			<text>{{item.mobile}}</text>
		</view>
		<view class="btn" @click="$util.redirectTo('/pages/subaccount/subaccount')">
			创建子账户
		</view>
		<!-- 加载 -->
		<loading-cover ref="loadingCover"></loading-cover>
	</view>
</template>

<script>
	import diyNavBar from '../../component/diy-nav/diy-navbar.vue'
	import loadingCover from '../../component/loading-cover/loading-cover.vue'
	export default{
		components:{diyNavBar,loadingCover},
		data(){
			return {
				dataList:[]
			}
		},
		onShow() {
			this.$http.sendrequest('/member/RightsList',{},{
				tokenJudge:true
			}).then(res=>{
				if(res.code == 1) {
					this.dataList = res.data;
					this.$refs.loadingCover.hide();
				}
			})
		}
	}
</script>

<style lang="scss" scoped>
	.subaccountlist{
		background: $uni-content-background-color;
		min-height: 100vh;
		.item{
			margin: 0 30rpx;
			display: flex;
			align-items: center;
			padding: 46rpx 60rpx;
			box-sizing: border-box;
			background: #FFFFFF;
			border-radius: 24rpx;
			font-size: 28rpx;
			color: #333333;
			margin-bottom: 20rpx;
			.header{
				// width: 48rpx;
				// height: 48rpx;
				font-size: 46rpx;
				border-radius: 50%;
				margin-right: 38rpx;
				color:$uni-tabbar-hovercolor ;
			}
		}
		.btn{
			width: 630rpx;
			height: 90rpx;
			background: #FF6F30;
			color: #FFFFFF;
			font-size: 28rpx;
			font-weight: bold;
			position: fixed;
			bottom: 106rpx;
			font-size: 32rpx;
			text-align: center;
			line-height: 90rpx;
			border-radius: 90rpx;
			left: 50%;
			transform: translateX(-50%);
		}
	}
</style>
